/// @tags:
#include <cstdio>
#include <iostream>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

constexpr int maxn = 2e5 + 2, mod = 998244353;

int _2xp[maxn], f[maxn], inv[maxn];

int main() {
  int n;
  cin >> n;
  _2xp[0] = 1;
  for (int i = 1; i <= n; ++i) {
    _2xp[i] = (int64_t)_2xp[i - 1] * 2 % mod;
  }
  inv[1] = 1;
  for (int i = 2; i <= n + 1; ++i) {
    inv[i] = (int64_t)(mod - mod / i) * inv[mod % i] % mod;
  }
  int ans = 0;
  f[0] = 1, f[1] = _2xp[n];
  for (int i = 2; i <= n + 1; ++i) {
    f[i] = (int64_t)f[i - 1] * (_2xp[n] - _2xp[i - 2] + mod) % mod * inv[i] % mod;
  }
  for (int i = 0; i <= n + 1; ++i) {
    ans = (ans + f[i]) % mod;
  }
  cout << ans;
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("C.in", "r", stdin);
  freopen("C.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
